#!/bin/bash
#set -x
#echo $1 >> /tmp/statofile
OKFLAG="OK"
if [ -z "$1" ];
then
	echo "MANCANO PARAMETRI"
	exit 2
fi

if [ "$1" = "$OKFLAG"  ];
then
	echo "NESSUNA OPERAZIONE RICHIESTA"
	exit 2
fi

TEST=`pidof klogd`
if [ $TEST  ]
then
	kill -9 $TEST
	$(sudo /etc/init.d/klogd restart > /dev/null 2>&1)
fi

TEST=`pidof syslogd`
if [ $TEST  ]
then
	kill -9 $TEST
	$(sudo /etc/init.d/sysklogd restart > /dev/null 2>&1)
fi
echo "OK"
exit 0
